// zh/index/index.js
Page({
  data:{
    header:{

    },
    nav:{
      itemList:[
        {
          cname:"微果汇",
          bc:"green"
        },
        {
          cname:"微果汇",
          bc:"red"
        },
        {
          cname:"微果汇",
          bc:"blue"
        },
        {
          cname:"微果汇",
          bc:"yellow"
        },
        {
          cname:"微果汇",
          bc:"yellow"
        },
        {
          cname:"微果汇",
          bc:"blue"
        },
        {
          cname:"微果汇",
          bc:"red"
        },
        {
          cname:"微果汇",
          bc:"green"
        },
      ]
    },
    swiper:{
      indicatorDots: true,
      vertical: false,
      autoplay: true,
      circular: true,
      interval: 2000,
      duration: 1000,
      itemList:[
        {
          img:"../../image/wechat.png",
          bc:"green"
        },
        {
          img:"../../image/wechat.png",
          bc:"red"
        },
        {
          img:"../../image/wechat.png",
          bc:"blue"
        },
        {
          img:"../../image/wechat.png",
          bc:"yellow"
        }
      ]
    },
    notice:{
      itemList:[
        {
          message:"小区公告：台风天气通知",
          page:"../notice/notice",
          imgUrl:"/image/arrowright.png",
        },
        {
          message:"青藤物业",
          page:"../about/about",
          imgUrl:"/image/arrowright.png",
        }
      ]
    },
    footer:{

    },
  },
  onLoad:function(options){
    // 页面初始化 options为页面跳转所带来的参数
    wx.showToast({
      title: 'welcome',
      icon: 'success',
      mask: true,
      // duration: 6000
      success:function(){
        console.log('yuan');
      }
    })
  },
  onReady:function(){
    // 页面渲染完成
  },
  onShow:function(){
    // 页面显示
  },
  onHide:function(){
    // 页面隐藏
  },
  onUnload:function(){
    // 页面关闭
  },
  changeIndicatorDots: function (e) {
    this.setData({
      indicatorDots: !this.data.indicatorDots
    })
  },
  changeVertical: function (e) {
    this.setData({
      vertical: !this.data.vertical
    })
  },
  changeAutoplay: function (e) {
    this.setData({
      autoplay: !this.data.autoplay
    })
  },
  intervalChange: function (e) {
    this.setData({
      interval: e.detail.value
    })
  },
  durationChange: function (e) {
    this.setData({
      duration: e.detail.value
    })
  }
})